﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace syc.Store
{
    public partial class 物料中心成本费用_In : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                DL_year.SelectedValue = DateTime.Now.Year.ToString();
                DL_month.SelectedValue = DateTime.Now.Month.ToString();
            }
        }
        protected void save_Click(object sender, EventArgs e)
        {
            if (CP_gz.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }
            if (CP_sj.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }
            if (CP_sd.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }
            if (CP_cy.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }

            if (CP_bg.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }
            if (CP_zj.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }
            if (CP_xl.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }

            if (CP_bj.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }
            if (CP_cdz.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }
            if (CP_lb.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }

            if (CP_dq.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }
            if (CP_lwf.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }
            if (CP_wj.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }
            if (CP_qt.Text == "")
            {
                this.Message.Text = "请输入数据！";
                return;
            }


            if (DS1.Insert() > 0)
            {
                this.Message.Text = "保存成功!";
            }
            else
            {
                this.Message.Text = "保存失败!";
            }

        }
    }
}
